<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript" src="jquery3.0.js"></script>
	<script type="text/javascript">
		$(function(){
			$('#div1').click(function(){
				$('#div2').stop().toggle(function(){$('#div2').animate('height','200');},function(){animate('width',200)});
			})
		});
	</script>
	<style type="text/css">
		*{
			margin:0;padding:0;
		}
		#div2{
			height:100px;
			width:100px;
			background:red;
			margin:100px auto;
			position:absolute;
			right:0px;
			top:100px;
			opacity:1;
		}
		
	</style>
</head>
<body>
	<button id="div1">点击这里</button>
	<div id="div2"></div>
</body>
</html>